<template>
	<div class="wrapper zhuTi">
		<v-head activeIndex="/knowledge"></v-head>
		<div class="content">
			<div class="cfff fbold tCenter title">主题知识库</div>
			<div class="center fWrap space-between">
				<router-link
					:to="`/knowledgeList?name=${item.name}&id=${item.id}`"
					class="bfff box hoverBtn"
					v-for="item in list"
					:key="item.id"
				>
					<div class="box-img">
						<img :src="item.cover" class="nav_icon" alt="" />
					</div>
					<div class="f16 fbold c333 menu-item">{{ item.name }}</div>
				</router-link>
				<span class="plac box" v-for="item in 10" :key="item"></span>
			</div>
		</div>
		<v-myfoot></v-myfoot>
	</div>
</template>

<script setup>
const { proxy } = getCurrentInstance()
import { getAxios } from "/axios"
const route = useRoute()
const router = useRouter()
const list = ref([])
async function created() {
	const res = await getAxios("/knowledge/kbSubjectWarehouse/list")
	list.value = res
}
created()
</script>
<style lang="scss" scoped>
.zhuTi {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-direction: column;

	.box {
		flex: 1;
		white-space: nowrap;
		height: 120px;
		background: #ffffff;
		border-radius: 5px;
		margin-bottom: 15px;
		min-width: 260px;
		display: flex;
		// justify-content: center;
		align-items: center;
		overflow: hidden;
		.box-img {
			width: 50%;
			display: flex;
			justify-content: flex-end;
			.nav_icon {
				width: 30px;
				margin-right: 15px;
			}
		}
		.menu-item {
			text-align: center;
			max-width: 150px;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
	}

	.subTitle {
		opacity: 0.7;
		margin-bottom: 50px;
		margin-top: 10px;
	}

	.content {
		background: url(@/assets/image/zhuTi/back.png) no-repeat center;
		background-size: cover;
		// overflow-y: auto;
		flex: 1;
		width: 100%;
		padding-top: 100px;
		.title {
			font-size: 24px;
			padding-bottom: 40px;
		}
		.center {
			gap: 25px;
			width: 95%;
			max-width: 1200px;
			margin: auto;
		}
	}
	.plac {
		height: 0;
		visibility: hidden;
	}
}
</style>
